home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / pipnss / nsICertificateDialogs.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  9KB  |  221 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsICertificateDialogs.idl
  3.  */
  4.  
  5. #ifndef __gen_nsICertificateDialogs_h__
  6. #define __gen_nsICertificateDialogs_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIInterfaceRequestor; /* forward declaration */
  18.  
  19. class nsIX509Cert; /* forward declaration */
  20.  
  21. class nsICRLInfo; /* forward declaration */
  22.  
  23.  
  24. /* starting interface:    nsICertificateDialogs */
  25. #define NS_ICERTIFICATEDIALOGS_IID_STR "a03ca940-09be-11d5-ac5d-000064657374"
  26.  
  27. #define NS_ICERTIFICATEDIALOGS_IID \
  28.   {0xa03ca940, 0x09be, 0x11d5, \
  29.     { 0xac, 0x5d, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }}
  30.  
  31. /**
  32.  * Functions that implement user interface dialogs to manage certificates.
  33.  *
  34.  * @status FROZEN
  35.  */
  36. class NS_NO_VTABLE nsICertificateDialogs : public nsISupports {
  37.  public: 
  38.  
  39.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICERTIFICATEDIALOGS_IID)
  40.  
  41.   /**
  42.    *  UI shown when a user is asked to download a new CA cert.
  43.    *  Provides user with ability to choose trust settings for the cert.
  44.    *  Asks the user to grant permission to import the certificate.
  45.    *
  46.    *  @param ctx A user interface context.
  47.    *  @param cert The certificate that is about to get installed.
  48.    *  @param trust a bit mask of trust flags, 
  49.    *               see nsIX509CertDB for possible values.
  50.    *
  51.    *  @return true if the user allows to import the certificate.
  52.    */
  53.   /* boolean confirmDownloadCACert (in nsIInterfaceRequestor ctx, in nsIX509Cert cert, out unsigned long trust); */
  54.   NS_IMETHOD ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert, PRUint32 *trust, PRBool *_retval) = 0;
  55.  
  56.   /**
  57.    *  UI shown when a web site has delivered a CA certificate to
  58.    *  be imported, but the certificate is already contained in the
  59.    *  user's storage.
  60.    *
  61.    *  @param ctx A user interface context.
  62.    */
  63.   /* void notifyCACertExists (in nsIInterfaceRequestor ctx); */
  64.   NS_IMETHOD NotifyCACertExists(nsIInterfaceRequestor *ctx) = 0;
  65.  
  66.   /**
  67.    *  UI shown when a user's personal certificate is going to be
  68.    *  exported to a backup file.
  69.    *  The implementation of this dialog should make sure 
  70.    *  to prompt the user to type the password twice in order to
  71.    *  confirm correct input.
  72.    *  The wording in the dialog should also motivate the user 
  73.    *  to enter a strong password.
  74.    *
  75.    *  @param ctx A user interface context.
  76.    *  @param password The password provided by the user.
  77.    *
  78.    *  @return false if the user requests to cancel.
  79.    */
  80.   /* boolean setPKCS12FilePassword (in nsIInterfaceRequestor ctx, out AString password); */
  81.   NS_IMETHOD SetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) = 0;
  82.  
  83.   /**
  84.    *  UI shown when a user is about to restore a personal
  85.    *  certificate from a backup file.
  86.    *  The user is requested to enter the password
  87.    *  that was used in the past to protect that backup file.
  88.    *
  89.    *  @param ctx A user interface context.
  90.    *  @param password The password provided by the user.
  91.    *
  92.    *  @return false if the user requests to cancel.
  93.    */
  94.   /* boolean getPKCS12FilePassword (in nsIInterfaceRequestor ctx, out AString password); */
  95.   NS_IMETHOD GetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) = 0;
  96.  
  97.   /**
  98.    *  UI shown when a certificate needs to be shown to the user.
  99.    *  The implementation should try to display as many attributes
  100.    *  as possible.
  101.    *
  102.    *  @param ctx A user interface context.
  103.    *  @param cert The certificate to be shown to the user.
  104.    */
  105.   /* void viewCert (in nsIInterfaceRequestor ctx, in nsIX509Cert cert); */
  106.   NS_IMETHOD ViewCert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert) = 0;
  107.  
  108.   /**
  109.    *  UI shown after a Certificate Revocation List (CRL) has been
  110.    *  successfully imported.
  111.    *
  112.    *  @param ctx A user interface context.
  113.    *  @param crl Information describing the CRL that was imported.
  114.    */
  115.   /* void crlImportStatusDialog (in nsIInterfaceRequestor ctx, in nsICRLInfo crl); */
  116.   NS_IMETHOD CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl) = 0;
  117.  
  118. };
  119.  
  120. /* Use this macro when declaring classes that implement this interface. */
  121. #define NS_DECL_NSICERTIFICATEDIALOGS \
  122.   NS_IMETHOD ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert, PRUint32 *trust, PRBool *_retval); \
  123.   NS_IMETHOD NotifyCACertExists(nsIInterfaceRequestor *ctx); \
  124.   NS_IMETHOD SetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval); \
  125.   NS_IMETHOD GetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval); \
  126.   NS_IMETHOD ViewCert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert); \
  127.   NS_IMETHOD CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl); 
  128.  
  129. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  130. #define NS_FORWARD_NSICERTIFICATEDIALOGS(_to) \
  131.   NS_IMETHOD ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert, PRUint32 *trust, PRBool *_retval) { return _to ConfirmDownloadCACert(ctx, cert, trust, _retval); } \
  132.   NS_IMETHOD NotifyCACertExists(nsIInterfaceRequestor *ctx) { return _to NotifyCACertExists(ctx); } \
  133.   NS_IMETHOD SetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) { return _to SetPKCS12FilePassword(ctx, password, _retval); } \
  134.   NS_IMETHOD GetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) { return _to GetPKCS12FilePassword(ctx, password, _retval); } \
  135.   NS_IMETHOD ViewCert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert) { return _to ViewCert(ctx, cert); } \
  136.   NS_IMETHOD CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl) { return _to CrlImportStatusDialog(ctx, crl); } 
  137.  
  138. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  139. #define NS_FORWARD_SAFE_NSICERTIFICATEDIALOGS(_to) \
  140.   NS_IMETHOD ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert, PRUint32 *trust, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmDownloadCACert(ctx, cert, trust, _retval); } \
  141.   NS_IMETHOD NotifyCACertExists(nsIInterfaceRequestor *ctx) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyCACertExists(ctx); } \
  142.   NS_IMETHOD SetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPKCS12FilePassword(ctx, password, _retval); } \
  143.   NS_IMETHOD GetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPKCS12FilePassword(ctx, password, _retval); } \
  144.   NS_IMETHOD ViewCert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert) { return !_to ? NS_ERROR_NULL_POINTER : _to->ViewCert(ctx, cert); } \
  145.   NS_IMETHOD CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl) { return !_to ? NS_ERROR_NULL_POINTER : _to->CrlImportStatusDialog(ctx, crl); } 
  146.  
  147. #if 0
  148. /* Use the code below as a template for the implementation class for this interface. */
  149.  
  150. /* Header file */
  151. class nsCertificateDialogs : public nsICertificateDialogs
  152. {
  153. public:
  154.   NS_DECL_ISUPPORTS
  155.   NS_DECL_NSICERTIFICATEDIALOGS
  156.  
  157.   nsCertificateDialogs();
  158.  
  159. private:
  160.   ~nsCertificateDialogs();
  161.  
  162. protected:
  163.   /* additional members */
  164. };
  165.  
  166. /* Implementation file */
  167. NS_IMPL_ISUPPORTS1(nsCertificateDialogs, nsICertificateDialogs)
  168.  
  169. nsCertificateDialogs::nsCertificateDialogs()
  170. {
  171.   /* member initializers and constructor code */
  172. }
  173.  
  174. nsCertificateDialogs::~nsCertificateDialogs()
  175. {
  176.   /* destructor code */
  177. }
  178.  
  179. /* boolean confirmDownloadCACert (in nsIInterfaceRequestor ctx, in nsIX509Cert cert, out unsigned long trust); */
  180. NS_IMETHODIMP nsCertificateDialogs::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert, PRUint32 *trust, PRBool *_retval)
  181. {
  182.     return NS_ERROR_NOT_IMPLEMENTED;
  183. }
  184.  
  185. /* void notifyCACertExists (in nsIInterfaceRequestor ctx); */
  186. NS_IMETHODIMP nsCertificateDialogs::NotifyCACertExists(nsIInterfaceRequestor *ctx)
  187. {
  188.     return NS_ERROR_NOT_IMPLEMENTED;
  189. }
  190.  
  191. /* boolean setPKCS12FilePassword (in nsIInterfaceRequestor ctx, out AString password); */
  192. NS_IMETHODIMP nsCertificateDialogs::SetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval)
  193. {
  194.     return NS_ERROR_NOT_IMPLEMENTED;
  195. }
  196.  
  197. /* boolean getPKCS12FilePassword (in nsIInterfaceRequestor ctx, out AString password); */
  198. NS_IMETHODIMP nsCertificateDialogs::GetPKCS12FilePassword(nsIInterfaceRequestor *ctx, nsAString & password, PRBool *_retval)
  199. {
  200.     return NS_ERROR_NOT_IMPLEMENTED;
  201. }
  202.  
  203. /* void viewCert (in nsIInterfaceRequestor ctx, in nsIX509Cert cert); */
  204. NS_IMETHODIMP nsCertificateDialogs::ViewCert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert)
  205. {
  206.     return NS_ERROR_NOT_IMPLEMENTED;
  207. }
  208.  
  209. /* void crlImportStatusDialog (in nsIInterfaceRequestor ctx, in nsICRLInfo crl); */
  210. NS_IMETHODIMP nsCertificateDialogs::CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl)
  211. {
  212.     return NS_ERROR_NOT_IMPLEMENTED;
  213. }
  214.  
  215. /* End of implementation class template. */
  216. #endif
  217.  
  218. #define NS_CERTIFICATEDIALOGS_CONTRACTID "@mozilla.org/nsCertificateDialogs;1"
  219.  
  220. #endif /* __gen_nsICertificateDialogs_h__ */
  221.